The present invention relates to updating geographically distributed databases. More particularly, the present invention relates to a method and apparatus for synchronizing the provision of data updates to geographically distributed databases.
A database may be used to store records or files of information such as telephone numbers or bank account numbers. Database files are organized so they may be easily accessed or updated. Many different types of network services are enabled by querying a database to obtain information from within the database""s files. For example, a switch within the public switched telephone network (PSTN) may query a database for information on how to process an incoming telephone call.
Many modem network service providers are challenged with providing one or more services to a large number of users who are widely distributed within a geographic region. For example, a single telecommunications company may provide telephony services to users throughout the entire United States. One method for providing network or other similar type services to users within a particular geographic region entails enabling users to access a single database from anywhere within the geographic region. Unfortunately, a single database arrangement suffers from a number of drawbacks which hinder the provision of services. For example, the service provider may be unable to provide services to any users if the single database experiences a software or mechanical failure. Additionally, a single database can only simultaneously process a limited number of user queries. Once the limited capacity of the database is exceeded, user queries may need to be queued pending the availability of required database processing resources. Large queuing delays may slow the provision of services to the users.
To remedy some of the drawbacks of a single database arrangement, many service providers store the same files of information on many different geographically distributed databases and connect each database to a central database and/or a general purpose computer within a central update center. Users throughout the geographic region can then obtain the same information or services from the same service provider by sending queries to the nearest available database. FIG. 1 illustrates a typical distributed database network. The distributed database network of FIG. 1 comprises an update center 102 adapted for two-way communication with each distributed database 104. Update center 102 may comprise a general purpose computer. This general purpose computer typically consists of a processor adapted to be connected to a segment of computer readable memory. The computer readable memory stores computer program code segments (database management software) which, when executed by the processor, implement steps to update one or more distributed databases.
Each distributed database 104 is typically connected to a general purpose computer which includes a processor adapted to be connected to a segment of computer readable memory. Each of these segments of computer readable memory store computer program code segments (update processing software) which, when executed by their respective processors, process data updates received from update center 102. These processing steps entail modifying their respective databases in accordance with the instructions/data included within the data updates received from update center 102. Data updates and acknowledgment messages are exchanged between database management software on the central database 102 general purpose computer and data update processing software on the general purpose computer of each distributed database 104 by encapsulating appropriate instructions/data within packets in accordance with a protocol (such as transmission control protocol/Internet protocol (TCP/IP)) and sending these packets to the appropriate destination.
For example, when one or more files stored within each distributed database requires modification, the service provider can use a keyboard attached to the update center 102 general purpose computer to enter the desired modifications in response to prompts generated by the database management software. Once the modifications are entered, the service provider can then execute the changes by instructing the database management software to encapsulate the modification instructions/data into update packets and send the data update packets to the update processing software on each distributed database 104 general purpose computer. The update processing software then processes each received data update packet by making the appropriate changes within its respective connected database. After a data update has been processed, the data update processing software activates the data update and then sends a packet including an acknowledgment message to the central database 102 database management software.
Unfortunately, due to unequal processor speeds and the randomness in processing time (e.g., due to resource contention), the rate at which each data update is processed at each database may differ. Thus, at any one period in time within the same network, different geographically distributed databases may include different data. If one database activates a data update and makes the updated data available to users prior to another database activating the same data update, a user who queries the first database and another user who queries the other database for the same information at the same time may receive different information or services. To avoid this possibility, it is advantageous for the service provider to synchronize the updating process so each geographically distributed database activates the same data update at substantially the same time.
In view of the above, it can be appreciated that there is a need for a method and apparatus which synchronizes the provision of data updates to distributed databases.
One embodiment of the present invention provides a method for synchronizing the provision of data updates to a plurality of databases. In accordance with an embodiment of the present invention, known database management software executed by a general purpose computer connected to each of the plurality of distributed databases is modified to include the ability to limit the number of data updates which may be outstanding to the plurality of distributed databases during any particular period of time. After receiving a user determined integer value representing a maximum number of outstanding data updates, the software determines an integer value representing the current number of outstanding data updates. A data update is outstanding when the data update has been sent (for example, from an update center) to each of the plurality of databases and an acknowledgment message corresponding to that data update has not been received from each of the plurality of databases. Next, the software compares the maximum number of outstanding data updates to the determined current number of outstanding data updates. If the current number is less than the received maximum number, the software transmits the next data update to each of the plurality of databases and increases the determined current number of outstanding data updates by one integer value. If the current number of outstanding data updates is greater than the maximum number of outstanding data updates, the software waits to receive an acknowledgment message corresponding to one of the outstanding data updates from each of the plurality of databases. Upon receiving an acknowledgment message (corresponding to one of the outstanding data updates) from each of the plurality of databases, the software decreases the determined current number of outstanding data updates by one integer value. After either transmitting a next data update or receiving the appropriate number of acknowledgment messages corresponding to an outstanding data update, the above described steps are repeated beginning with the step of determining the current number of outstanding data updates.